home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
-
- ###############################################################################
- ### ###
- ### GNU Interactive Tools 4.3.10 per file type action script ###
- ### Local version ###
- ### Copyright (c) 1993, 1994, 1995, 1996 Free Software Foundation, Inc. ###
- ### Written by Tudor Hulubei and Andrei Pitis. ###
- ### ###
- ###############################################################################
-
- #
- # This script executes a different action for each file type specified.
- # The script tries to match the second parameter against the patterns
- # specified in the 'case' statement (see below).
- # If you want to add new file types & actions to this script, just add a
- # new entry to the 'case' statement *before* the last one ( *) ... )
- #
- # For grater flexibility, .gitaction's first parameter is the name of the
- # directory where the file resides. So, you can get the complete file
- # name appending the file base name to the file path just like that: $1/$2
- #
-
- name=`basename $0`
-
- if test "$#" -ne 2 -o ! -d "$1" -o ! -f "$2"; then
- echo "$name: GIT internal script" >&2
- exit 1
- fi
-
- done=1
-
- case $2 in
- *.foo) ls -la $2;;
- *.bar) $GIT_PAGER $2;;
- *) done=0
- esac
-
- exit $done
-